package org.bling.star.common.enums;

public enum ServerType {
    //客户端
    CLIENT(false),
    //服务端
    SERVER(true);
    private final Boolean code;

    ServerType(Boolean b) {
        this.code = b;
    }

    public static ServerType getServerType(Boolean code) {
        if (code != null && code) {
            return ServerType.SERVER;
        }
        return ServerType.CLIENT;
    }

    public Boolean getCode() {
        return this.code;
    }
}
